<div style="margin-left:20px">
    <div>
        <h5><b>分类</b></h5>
        {% for rcategory in r_category %}
            <h6>{{rcategory.category__category}}</h6>
            {% for rtag in r_tag %}
                {% if rcategory.category__category == rtag.category__category %}
                    <ul>
                        <li>
                            <a href="/tag/{{rtag.tag__tag}}">{{rtag.tag__tag}}</a>&emsp;<span>{{rtag.count}}</span>
                        </li>
                    </ul>
                {% endif %}
            {% endfor %}
        {% endfor %}
    </div>
    <hr/>
    <div>
        <h5><b>近期文章</b></h5>
        <ul>
            {% for rpost in r_recent_post %}
            <li>
<!--                <a href="/post/{{rpost.id}}">{{rpost.title|truncatechars:'10'}}</a>-->
                <a href="/post/{{rpost.id}}">{{rpost.title|slice:'12'}}</a>
            </li>
            {% endfor %}
        </ul>
    </div>
    <hr/>
    <div>
        <h5><b>归档</b></h5>
        <ul>
            {% for rfilepost in r_file_post %}
                <li>
                    <a href="/archive/{{rfilepost.0|date:'Y'}}/{{rfilepost.0|date:'m'}}/">{{rfilepost.0|date:'Y'}}年{{rfilepost.0|date:'m'}}月</a>
                    &emsp;<span>{{rfilepost.1}}</span>
                </li>
            {% endfor %}
        </ul>
    </div>
</div>